<?php
require_once 'class/control.class.php';
ob_start();
$id = $_GET['id'];

$obj = new Control('consultar','imagens',$id);
$obj->Consult();
$img = $obj->result->lista;

$obj = new Control('consultar','categorias',$img['idcategorias']);
$obj->Consult();
$cat = $obj->result->lista;

$obj = new Control('buscar','pontos',$img['idimagens']);
$obj->Consult();
$pnt = $obj->result->lista;

?>
			<img src="images/fill_top.png" />
			<p class="tituloG">
				<img src="images/banco/<?php echo $cat['imagem0']; ?>" align="absmiddle" /><?php echo utf8_decode($cat['nome']); ?>
			</p>
			<p class="textoApoio">
				Passe o mouse sobre os bot&otilde;es na imagem<br />para detalhes e dicas sobre os materiais utilizados.
			</p>
			<img src="images/btn_voltar.png" class="btnVoltar" />
			<img src="images/fill_bottom.png" />
			<br clear="all" /><br />
			<?php 
			foreach($pnt as $k=>$v){
				$xy = explode(',',$pnt[$k]['posicao']);
			?>
				<div class="point" style="position:absolute;margin-left:<?php echo $xy[0]; ?>px;margin-top:<?php echo $xy[1]; ?>px;">
					<img src="images/btn_mais.png">
					<div class="info">
						<p class="tituloM"><?php echo $pnt[$k]['titulo']; ?></p>
						<?php echo strip_tags($pnt[$k]['texto']); ?>
						<a href="<?php echo $pnt[$k]['url']; ?>">Clique aqui e conhe&ccedil;a o material.</a>
					</div>
					<div class="setinha">&nbsp;</div>
				</div>
			<?php 
			}
			?>
			<img src="images/banco/<?php echo $img['imagem0']; ?>" width="727" />
			
			<div class="legenda">
				<div class="left">
					<?php echo utf8_decode($img['nome']); ?>
				</div>
				<div class="right">
					<img src="images/btn_compartilhar_g.png" align="center" />
					&nbsp;&nbsp;
					<img src="images/btn_add_album.png" align="center" />
				</div>	
			</div>
			<br clear="all" />
			<div class="left">
				<img src="images/btn_anterior.png">
			</div>
			<div class="right">
				<img src="images/btn_proxima.png">
			</div>		
			<br clear="all" />
			<br /><br />
			<img src="images/fill_bottom.png" />
			<br />
<?php 
$conteudo = ob_get_contents();
ob_get_clean();
include 'master.php';
?>			